<template>
  <view class="enroll">
    <view class="nesting">
      <image src="/static/login/nesting.png" mode="" />
    </view>
    <tabTopBar :title="''" :bgColor="'transparent'" />
    <view class="content">
      <view class="image">
        <image src="/static/login/success-gren.png" mode="" />
      </view>
      <view class="text">
        {{ contentText }}
      </view>
    </view>
    <view class="footer" @click="goLogin">
      {{ t("outcomeType.goLogin") }}
    </view>
  </view>
</template>

<script setup>
import { ref } from "vue";
import { onLoad } from "@dcloudio/uni-app";

import { useI18n } from "vue-i18n";
const { t } = useI18n();

const contentText = ref("");
onLoad((options) => {
  contentText.value = options.title;
});

const goLogin = () => {
  uni.reLaunch({
    url: "/pages/login/index",
  });
};
</script>

<style lang="scss" scoped>
.enroll {
  width: 100%;
  height: 100vh;
  background: linear-gradient(180deg, #08121e, #08121e);
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
  .nesting {
    width: 960upx;
    height: 1320upx;
    position: absolute;
    top: -100upx;
    left: 145upx;
    /* 让点击事件穿透该元素 */
    pointer-events: none;
    image {
      width: 100%;
      height: 100%;
    }
  }
  .content {
    width: 100%;
    position: absolute;
    top: 35vh;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    .image {
      width: 136rpx;
      height: 136rpx;
      margin: 0 auto;
      image {
        width: 100%;
        height: 100%;
      }
    }
    .text {
      margin-top: 60rpx;
      width: 100%;
      font-size: 48rpx;
      font-weight: 500;
      color: #ffffff;
    }
  }
  .footer {
    width: 416rpx;
    height: 96rpx;
    box-sizing: border-box;
    border: 1px solid #525961;
    position: fixed;
    bottom: 128rpx;
    left: 50%;
    transform: translate(-50%, -50%);
    line-height: 96rpx;
    text-align: center;
    border-radius: 100rpx;
    font-size: 34rpx;
    font-weight: 500;
    color: #ffffff;
  }
}
</style>
